import PyPDF2

# 打开PDF文件
with open('F:\\检验报告.pdf', 'rb') as file:
    reader = PyPDF2.PdfReader(file)
    text = ''

    # 遍历每一页并提取文字
    for page_num in range(len(reader.pages)):
        page = reader.pages[page_num]
        text += page.extract_text()

    print(text)